<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'left.jsp' starting page</title>
	<script type="text/javascript" src="./js/jquery-1.8.0.js"></script>
	<link rel="StyleSheet" href="<%=path %>/css/dtree.css" type="text/css" />
	<script type="text/javascript" src="<%=path %>/js/dtree.js"></script>
  </head>
  
  <body> 
  <div id="treeData">
  </div>
   <div class="dtree">
    <script type="text/javascript">
  
    showCataglog();
  function showCataglog()
  {
    d = new dTree('d');
		//构造根节点
	d.add(0,-1,'菜单');
   $.post("catalog.do?method=showCatalog",function(data,status){ 
	  
     $.each(data,function(index,content){
     
   		 d.add(parseInt(content.catalogId),parseInt(content.parentId),content.catalogName,content.catalogUrl);
   		
     });
 	  $("#treeData").html(d.toString()); 
    },"json");
  }
  
    </script>
   </div> 
  </body>
  
  
</html>

